home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / pcplus2.zip / MCI.ASP < prev    next >
Text File  |  1988-01-01  |  3KB  |  73 lines

  1. ;*************************************************************************
  2. ;* MCI.ASP  (C) 1987 DATASTORM TECHNOLOGIES, INC.                        *
  3. ;*                                                                       *
  4. ;* A sample ASPECT script file for logging onto MCI MAIL via tymnet.     *
  5. ;*                                                                       *
  6. ;* It checks for mail and sounds an alarm if mail is found.  Otherwise   *
  7. ;* it will log you off MCI MAIL.                                         *
  8. ;*                                                                       *
  9. ;*************************************************************************
  10.  
  11. ASSIGN S0 "874-2771"     ; enter your local TYMNET number here
  12. ASSIGN S1 "uuuuu"        ; enter your USERID here
  13. ASSIGN S2 "pppppppp"     ; enter your PASSWORD here
  14.  
  15. EMULATE ANSI               ; Select terminal emulation
  16.  
  17. WHEN "Press <RETURN>" "~^M"         ; Take care of paging
  18. SET ATIME 0                         ; Reset alarm time
  19.  
  20. IF NOT LINKED                       ; If not called via Dial Dir
  21.    CLEAR                            ; Clear the screen
  22.    MESSAGE "Calling MCI MAIL via TYMNET"
  23.    SET BAUD 1200                    ; Configure line settings
  24.    SET PARITY EVEN
  25.    SET DATABITS 7
  26.    SET DUPLEX FULL
  27.    MDIAL S0                         ; Dial TYMNET
  28. ENDIF
  29.  
  30. PAUSE 3                             ; Wait a bit
  31. TRANSMIT "A"                        ; Send the terminal ID
  32. WAITFOR "please log in:" 30         ; Wait for prompt
  33. TRANSMIT "mcimail^M"                ; Ask for MCIMAIL
  34. WAITFOR "user name:"                ; Wait for prompt
  35. TRANSMIT S1                         ; Send ID
  36. TRANSMIT "^M"                       ; Send CR
  37. WAITFOR "Password:"                 ; Waitfor prompt
  38. TRANSMIT S2                         ; Send PASSWORD
  39. TRANSMIT "^M"                       ; Send CR
  40.  
  41. WAITFOR "MCI Mail Version 4.0^M^J ^M^J    "   ; Wait for prompt
  42.  
  43. RGET S3                             ; Get mail message
  44. WAITFOR "EXIT):"                    ; Wait for prompt
  45.  
  46. FIND S3 "no messages"               ; Check string for target
  47. IF FOUND                            ; If no msgs
  48.    TRANSMIT "exit^M"                ; Issue logout
  49.    PAUSE 4                          ; Wait for logout
  50.    HANGUP                           ; Hangup for TYMNET
  51.    CLEAR                            ; Clear the screen
  52.    MESSAGE "NO MESSAGES ON MCI"     ; Notify user
  53. ELSE
  54.    MESSAGE "YOU HAVE MESSAGES ON MCI"   ; Else notify user
  55.    GOSUB ALERT                      ; Sound alarm
  56. ENDIF
  57.  
  58. EXIT                                ; Exit script
  59.  
  60. ; SUBROUTINE AREA
  61.  
  62. ALERT:       ; Subroutine ALERT sounds an alarm
  63.  
  64. SOUND 500 50
  65. SOUND 400 50
  66. SOUND 500 50
  67. SOUND 400 50
  68. SOUND 500 50
  69. SOUND 400 50
  70.  
  71. RETURN
  72.  
  73.